Function Reference

_GUICtrlStatusBarGetTip

Gets Statusbar TipText.

#Include <GuiStatusBar.au3>
_GUICtrlStatusBarGetTip($h_StatusBar[, $i_Panel=0])

 

Parameters

$h_StatusBar The Control Id (will be converted to hWnd)
$i_Panel Optional: The panel to retreive the text from (Default: 0)

 

Return Value

Tip Text, on error empty string and @error is set to 1

 

Remarks

The status bar must be created with the $SBT_TOOLTIPS style to enable ToolTips.

This ToolTip text is displayed in two situations:

    When the corresponding pane in the status bar contains only an icon.
    When the corresponding pane in the status bar contains text that is truncated due to the size of the pane.

 

Related

_GUICtrlStatusBarCreate, _GUICtrlStatusBarSetTip

 

Example


opt("MustDeclareVars", 1)

#include <GUIConstants.au3>
#Include <GuiStatusBar.au3>

Local $gui, $StatusBar1, $msg, $lbl_Info
Local $a_PartsRightEdge[3] = [100, 350, -1]
Local $a_PartsText[3] = ["New Text", "More Text", "Even More Text"]

$gui = GUICreate("Status Bar Get Tip Text", 500, -1, -1, -1, $WS_SIZEBOX)

$StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, "", $SBT_TOOLTIPS)

_GUICtrlStatusBarSetIcon ($StatusBar1, 1, "shell32.dll", 168)
_GUICtrlStatusBarSetIcon ($StatusBar1, 0, "shell32.dll", 21)
_GUICtrlStatusBarSetIcon ($StatusBar1, 2, "shell32.dll", 24)

_GUICtrlStatusBarSetTip ($StatusBar1, 0, "Part 1")
_GUICtrlStatusBarSetTip ($StatusBar1, 1, "This is a Tip for the status bar")
_GUICtrlStatusBarSetTip ($StatusBar1, 2, "Part 3")

$lbl_Info = GUICtrlCreateLabel("Tip Text of 2nd Part: " & _GUICtrlStatusBarGetTip ($StatusBar1, 1), 10, 10, 250, 20)

GUISetState(@SW_SHOW)



While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_RESIZED
            _GUICtrlStatusBarResize ($StatusBar1)
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            ;;;;;
    EndSelect
   
WEnd